package com.wsm.springai.studydemo2.tools;

import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ToolService {

    @Autowired
    private GhService ghService;
    @Tool(description = "退号,必须提供手机号和姓名，只提供了一个的话，告诉用户需要在提供另一个")
    public String cancel(@ToolParam String name , @ToolParam String phoneNumber) {
        ghService.cancel(name, phoneNumber);
        return "退号成功";
    }
}
